#ifndef __STREAMREADER_H__
#define __STREAMREADER_H__

//#include "../types/BaseType.h"
#include <string>

class StreamReader
{
public:
	StreamReader(const void* pBuffer, int nBufferSize, bool bManageBuffer = false);
	virtual ~StreamReader();

	bool read(void* pDataOut, int nSize);
	bool skip(int nSize);

	void reset();
	const void* getBuffer();
	int getSize();
	int getPosition();

private:
	bool m_bManageBuffer;
	const char* m_pBuffer;
	int m_nBufferSize;
	int m_nReadPos;

};
#endif // __STREAMREADER_H__
